package com.qdxwx.models.enums;

/**
 * 文库类型
 */
public enum DocumentType {
    UNKNOWN("未知"),
    PHOTOSHOP("PS设计"),
    SKETCHUP("SU设计"),
    AUTOCAD("CAD文档"),
    SKETCH("SKETCH");


    private String title;

    DocumentType(String title){
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public static String getTitle(int typeId) {
        try {
            return DocumentType.values()[typeId].getTitle();
        } catch (Exception ex) {
            return DocumentType.UNKNOWN.getTitle();
        }
    }

    @Override
    public String toString() {
        return "DocumentType{" +
                "title='" + title + '\'' +
                "} " + super.toString();
    }
}

